<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>

<style>
	.ui-widget-header {
		background: url("{{url:base}}media/jquery-ui/css/custom-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png") repeat-x scroll 50% 50% #CCCCCC !important;
		border: 1px solid #AAAAAA !important;
		color: #222222 !important;
		font-weight: bold !important;
	}
	.ui-widget {
	   font-size: 0.8em !important;
	}	
	#escort_section{
		float:left;width:620px;
		overflow:auto;
		background:#F9F9F6;
		padding-top:5px;padding-bottom:5px;
		margin-bottom:15px;
		height:140px;
	}	
	.escort-item{
		float:left;
		width:100px;
		height:100px;
		margin:5px 10px;
		border:1px solid #cccccc;
		position:relative;
	}	
	.escort-name-x{
		position:absolute;
		bottom:40px;
		left:0px;
		background:#fff;
		font-size:12px;
		padding:2px 4px;
	}
	.escort-manage{
		position:absolute;
		bottom:0px;
		left:0px;
		background:#fff;
		font-size:12px;
		padding:2px 4px;
	}
	#my-escort-section{
		width:480px;
		height:125px;
		float:left;
	}
	#my-escort-section ul{list-style:none; display:block;white-space:nowrap;float:left;width:10000px;}
	#my-escort-section ul li{display:inline;float:float;}
	.escort-manage a{color:#333333;}
	
	.escort-delete-icon{
		position:absolute;
		top:0px;
		right:0px;
		background:#fff url({{url:base}}/media/img/delete.png) center center no-repeat;
		width:25px;height:20px;
		cursor:pointer;
	}
</style>

<div id="escort_section">
	<div id="escort_add_1" class="escort-item add-new" >
        <a href="<?php echo site_url_lang("agent/profile/add_new");?>" title="<?php echo language_translate('add_escorts_title');?>">
            <img src="<?php echo base_url()."media/img/add.png"?>" />
        </a>
    </div>
	
	<div id="my-escort-section">
		<?php $this->load->view('agent/load_my_escorts'); ?>
	</div>
</div>


<script type="text/javascript">
	$(document).ready(function() {
		$('#agent_browse_escort a').live('click',function(){
			$link = $(this).attr('href');
			$('#greyDiv').show();
			$.get($link,{},function(res){$('#greyDiv').hide();$('#my-escort-section').html(res);});
			return false;
		});
		$('#my-escort-section ul').width(TOTAL_W_X);
		$('.escort-delete-icon').bind('click',function(){
			$id = $(this).attr('rel');
			if(confirm("<?php echo language_translate('delete_escort_confirm');?>")){
				$('#greyDiv').show();
				$.post(BASE_URI+'agent/my_account/delete_escort',{id:$id},function(res){
					$('#greyDiv').hide();
					$('#escort_li_'+$id).fadeOut();
				});
			}
		});
	});
	
</script>